﻿@ModelType Employee
@Code
    ViewData("Title") = "Create"
End Code

<h2>Create</h2>

@Using (Html.BeginForm()) 
    @Html.AntiForgeryToken()
    
    @<div class="form-horizontal">
        <h4>Employee</h4>
        <hr />
        @Html.ValidationSummary(true)
        <div class="form-group">
            @Html.LabelFor(Function(model) model.LastName, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.LastName)
                @Html.ValidationMessageFor(Function(model) model.LastName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.FirstName, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.FirstName)
                @Html.ValidationMessageFor(Function(model) model.FirstName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.Title, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.Title)
                @Html.ValidationMessageFor(Function(model) model.Title)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.TitleOfCourtesy, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.TitleOfCourtesy)
                @Html.ValidationMessageFor(Function(model) model.TitleOfCourtesy)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.BirthDate, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.BirthDate)
                @Html.ValidationMessageFor(Function(model) model.BirthDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.HireDate, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.HireDate)
                @Html.ValidationMessageFor(Function(model) model.HireDate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.Address, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.Address)
                @Html.ValidationMessageFor(Function(model) model.Address)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.City, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.City)
                @Html.ValidationMessageFor(Function(model) model.City)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.Region, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.Region)
                @Html.ValidationMessageFor(Function(model) model.Region)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.PostalCode, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.PostalCode)
                @Html.ValidationMessageFor(Function(model) model.PostalCode)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.Country, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.Country)
                @Html.ValidationMessageFor(Function(model) model.Country)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.HomePhone, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.HomePhone)
                @Html.ValidationMessageFor(Function(model) model.HomePhone)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.Extension, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.Extension)
                @Html.ValidationMessageFor(Function(model) model.Extension)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.Photo, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.Photo)
                @Html.ValidationMessageFor(Function(model) model.Photo)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.Notes, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.Notes)
                @Html.ValidationMessageFor(Function(model) model.Notes)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(Function(model) model.ReportsTo, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(model) model.ReportsTo)
                @Html.ValidationMessageFor(Function(model) model.ReportsTo)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
End Using

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@Section Scripts 
    @Scripts.Render("~/bundles/jqueryval")
End Section
